home *** CD-ROM | disk | FTP | other *** search
- /concatprocs
- { /proc2 exch cvlit def /proc1 exch cvlit def
- /newproc proc1 length proc2 length add array def
- newproc 0 proc1 putinterval newproc proc1 length proc2 putinterval
- newproc cvx
- } def
- /inch { 72 mul } def
- /lightnslide %% gray percnt ... grayt
- { 1 index dup 0 eq exch 1 eq or
- { pop }
- { dup 0 lt
- { abs 100 exch sub mul 100 div }
- { dup 100 exch sub 3 -1 roll mul add 100 div }
- ifelse
- } ifelse
- } bind def
- /centrcompress %% gray percnt ... grayt
- { 1 index dup 0 eq exch 1 eq or
- { pop }
- { dup 100 exch sub 3 -1 roll mul exch 2 div add 100 div }
- ifelse
- } bind def
- /iquotfrac { div dup truncate dup 3 -1 roll exch sub } def
- /min { 1 index 1 index lt { pop } { exch pop } ifelse } def
- /max { 1 index 1 index gt { pop } { exch pop } ifelse } def
- /negcurv
- 1.1 1.3 1.7 2.3 3.1 4 5 6.1 7.5 8.7 9.9 11.1 12.3 13.3 14.2 14.7 15.1
- 17 array astore def
- /reprocurv
- 2 2.6 3.2 4 4.9 5.8 6.75 7.7 8.7 9.6 10.55 11.45 12.4 13.3 14.15 14.75 15
- 17 array astore def
- /loadneg
- { /graycurv negcurv aload pop 17 array astore def } def
- /loadrepro
- { /graycurv reprocurv aload pop 17 array astore def } def
- /lookupgray
- { dup dup 0 eq exch 1 eq or not
- { 255 mul 16 iquotfrac exch dup graycurv exch cvi get
- exch graycurv exch cvi 1 add get
- 2 copy exch sub 4 -1 roll mul exch pop add
- 16 mul 255 div 1 min 0 max
- } if
- } bind def